import type { chatGroupMessage, chatMessage } from '@/types/chat'
import type { homeGroup } from '@/types/home'
import { request } from '@/utils/request'

//获取首页消息列表
export const getHomeMessage = () => {
  return request('/getHomeChatMeassage')
}
export const getChatMessage = (sender_id: string) => {
  return request<chatMessage>(`/chat?sender_id=${sender_id}`)
}
export const getGroupMessageList = () => {
  return request<homeGroup[]>('/getGroupChatMessage')
}
export const getGroupMessage = (group_id: string) => {
  return request<chatGroupMessage[]>(`/getGroupMessages?group_id=${group_id}`)
}
